package com.hutiao.snowhb.wechat.parser;

import org.jdom.Element;
import org.jdom.JDOMException;

import com.hutiao.snowhb.wechat.vo.WxRecvMsg;
import com.hutiao.snowhb.wechat.vo.WxRecvVoiceMsg;

public class WxRecvVoiceMsgParser extends WxRecvMsgBaseParser {

	@Override
	protected WxRecvVoiceMsg parser(Element root, WxRecvMsg msg) throws JDOMException {
		String mediaId = getElementText(root, "MediaId");
		String format = getElementText(root, "Format");
		
		return new WxRecvVoiceMsg(msg, mediaId,format);
	}

}
